const toString = Object.prototype.toString;
// 判断一个普通的对象
export const isPlainObject = (obj) => toString.call(obj) === '[object Object]' || toString.call(obj) === '[object Module]'; // 可能是webpack中的es的模块
// 判断是函数
export const isFunction = (fn) => typeof fn === 'function';
// 判断a的__proto__ 是不是b.prototype
export const instance = (a, b) => a instanceof b;


export const compose = (...args) => args.reduce((a, b) => (...args) => a(b(...args)))
